<template>
  <div>
    <!-- <MyDialogVue :flag="flag" @close_event="flag = false" /> -->
    <!-- 下面写两个v-model就报错了，一个自定义组件上面只能写一个v-model -->
    <!-- <MyDialogVue v-model="flag" v-model="count" /> -->
    <!-- <MyDialogVue v-model="flag" /> -->
    <MyDialogVue :a.sync="flag" :count.sync="count"  />
    <!-- <MyDialogVue :a="flag" @update:a="a = $event" /> -->

    <button @click="open">打开弹出框</button>
  </div>
</template>

<script>
import MyDialogVue from './components/MyDialog.vue'

export default {
  components: { MyDialogVue },
  data() {
    return {
      flag: false,
      count: 10
    }
  },
  methods:{
    open() {
      this.flag = true
    }
  }
}
</script>